home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / make_iso.sh < prev    next >
Linux/UNIX/POSIX Shell Script  |  2008-11-21  |  932b  |  30 lines

  1. #!/bin/bash
  2. # ---------------------------------------------------
  3. # Script to create bootable ISO in Linux
  4. # usage: make_iso.sh [ /tmp/slax.iso ]
  5. # author: Tomas M. <http://www.linux-live.org>
  6. # ---------------------------------------------------
  7.  
  8. if [ "$1" = "--help" -o "$1" = "-h" ]; then
  9.   echo "This script will create bootable ISO from files in curent directory."
  10.   echo "Current directory must be writable."
  11.   echo "example: $0 /mnt/hda5/slax.iso"
  12.   exit
  13. fi
  14.  
  15. CDLABEL="SLAX"
  16. ISONAME=$(readlink -f "$1")
  17.  
  18. cd $(dirname $0)
  19.  
  20. if [ "$ISONAME" = "" ]; then
  21.    SUGGEST=$(readlink -f ../../$(basename $(pwd)).iso)
  22.    echo -ne "Target ISO file name [ Hit enter for $SUGGEST ]: "
  23.    read ISONAME
  24.    if [ "$ISONAME" = "" ]; then ISONAME="$SUGGEST"; fi
  25. fi
  26.  
  27. mkisofs -o "$ISONAME" -v -J -R -D -A "$CDLABEL" -V "$CDLABEL" \
  28. -no-emul-boot -boot-info-table -boot-load-size 4 \
  29. -b boot/isolinux/isolinux.bin -c boot/isolinux/isolinux.boot ../.
  30.